<?php
/**
 * Category Admin
 */
?>
<div class="header">
	<div class="add"> <!-- @todo Change the name of this class... wtf is "add"? :-s -->
		<a href="<?= $this->routeUrl("admin_category_list") ?>">Category List</a> | 
		<a href="<?= $this->routeUrl("admin_category_delete", array("category_id" => $this->category['category_id'])) ?>">Delete Category</a> | 
		<?php if ($this->category['is_active']): ?>
			<a href="<?= $this->routeUrl("admin_category_deactivate", array("category_id" => $this->category['category_id'])) ?>">Deactivate Category</a>
		<?php else: ?>
			<a href="<?= $this->routeUrl("admin_category_activate", array("category_id" => $this->category['category_id'])) ?>">Activate Category</a>
		<?php endif ?>
	</div>
	<div class="clear"></div>
</div>

<div id="categoryadmin" class="adminbox">
	<?= $this->partial('category/edit.tabs.phtml', array(
		'category' => $this->category,
		'tab' => $this->tab
	)) ?>
	<?php
	/**
	 * I use a switch here so that people can't just pass in arbitrary template names to load
	 * @todo Eventually this needs to come from extensions somehow...
	 */
	switch($this->tab) {
		default:
			echo $this->render('category/edit.default.phtml');
			break;
	}
	?>

</div> <!-- /#categoryadmin -->